package com.admin.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @datetime: 2019/6/26 0026:11:02
 * @autohr: aiyls
 * @Description: 本地日志参考
 **/
public class LogUtil {
    /**
     * 获取业务日志logger
     * @return
     */
    public static Logger getBussinessLogger(){
        return LoggerFactory.getLogger(LogEnum.BUSSINESS.getCategory());
    }

    /**
     * 获取平台日志logger
     * @return
     */
    public static Logger getPlatformLogger(){
        return LoggerFactory.getLogger(LogEnum.PLATFORM.getCategory());
    }

    /**
     * 获取数据库日志
     * @return
     */
    public static Logger getDBLogger(){
        return LoggerFactory.getLogger(LogEnum.DB.getCategory());
    }

    /**
     * 获取异常日志
     * @return
     */
    public static Logger getExceptionLogger(){
        return LoggerFactory.getLogger(LogEnum.EXCEPTION.getCategory());
    }

    public static Logger getLogger(Class<?> clazz){
        return LoggerFactory.getLogger(clazz);
    }

}
